1. Field
The present disclosure relates generally to shading a computer-generated scene based on a point cloud representing objects in the scene and more specifically, to shading a computer-generated scene using directional importance mapping to improve efficiency.
2. Description of Related Art
Global illumination is a technique used in computer graphics to add more realistic lighting to a scene. One global illumination approach is known as the point-based global illumination (PBGI) approach. PBGI generally involves solving indirect illumination integrals and occlusion integrals. With PBGI, the directly illuminated objects in the scene are represented by a point cloud, which is generated in a pre-computation phase prior to the rendering of the scene.
A point cloud is a model that may be used to represent a surface and/or volume of an object using a set of points (which may also be called “emitter points”), with each point representing a position in three-dimensional space. In one example, an emitter point may be a data representation of a surfel, which is a small, disk-shaped surface element making up the different objects within a scene. In this example, the surfaces of different objects are subdivided into small micropolygons (or surfels), and the light energy emitting from each micropolygon (e.g., the radiance) is stored with each emitter point. An emitter point can also store other information, including a position, a surface normal, an effective area, a point-radius, and the like. The effective area and the point-radius stored in an emitter point are not the same thing; rather, they are two different representations of the size of the emitter point. The point-radius circumscribes the micropolygon that the emitter point represents. This ensures that the surfaces of the objects are completely covered by the emitter points with no gaps in between. The effective area is the area of the emitter point itself, which is typically smaller than the area corresponding to the point-radius.
To efficiently solve the illumination integrals with PBGI, the generated point cloud may be further organized into a multi-resolution level of detail hierarchy. For example, an octree data structure may be used to partition the three-dimensional space represented by a point cloud by recursively subdividing the space into eight octants. An octree data structure is a tree data structure wherein each internal node has up to eight child nodes. Leaf nodes in the octree store the individual emitter points of the point cloud. Each non-leaf node stores an emitter point cluster, which is an approximation of a collection of emitter points situated within a particular volume. For example, an emitter point cluster representation includes an average position for the emitter point cluster, as well as the projected area and emitted energy when the emitter point cluster is viewed from various directions (the directional projected area and directional emitted energy, respectively).
After generating the octree hierarchy, both the full point cloud and the octree hierarchy may then be used to compute the indirect illumination integrals and occlusion integrals at all “shading locations” (which may also be called “receiver points”) seen from a virtual camera. However, not all nodes of the octree are necessary to compute the integrals at a particular shading location. For example, when an object is far away from a shading location in the scene, less refined nodes of the octree may be used to calculate the various integrals. When an object is close by, more refined nodes or even leaf nodes representing individual emitter points may be used. However, using more refined nodes to compute the integrals translates to longer shading time.
Rendered images used in high-quality motion pictures need to be photorealistic. One way to increase photorealism is to shade receiver points using emitter point clusters with higher levels of detail. However, using emitter point clusters with higher levels of detail necessarily requires using more emitter point clusters, which increases both rendering time and memory usage. Additionally, a level of detail that is suitable for one portion of the image may not be sufficient to provide acceptable quality for another portion of the image. Therefore, a technique is required that allows for the ability to define different acceptable levels of detail for different portions of the image.